package com.sg.controller.pbff;

import com.sg.service.biz.pbff.BaseService;
import com.sg.dto.biz.pbff.req.*;
import com.sg.dto.biz.pbff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "Base", tags = {"Base"})
@RestController
// @RequestMapping("/poms/base/")
public class BaseController {
    @Autowired
    BaseService baseService;

    /**
     * B1-2新增场景（平台）
     * gen by moon at 8/10/2022, 3:39:23 AM
     */
    @PostMapping("/oms/platform/base/addScene")
    @ApiOperation(value = "B1-2新增场景（平台）", response = OkrResult.class)
    public OkrResult<BffAddSceneRespDto> addScene(@RequestBody(required = false) @Validated BffAddSceneReqDto reqDTO) {
        return OkrResult.success(baseService.addScene(reqDTO));
    }

    /**
     * B1-2查询空间列表（平台）
     * gen by moon at 8/10/2022, 3:39:51 AM
     */
    @PostMapping("/oms/platform/base/querySpaceList")
    @ApiOperation(value = "B1-2查询空间列表（平台）", response = OkrResult.class)
    public OkrResult<BffQuerySpaceListRespDto> querySpaceList(@RequestBody(required = false) @Validated BffQuerySpaceListReqDto reqDTO) {
        return OkrResult.success(baseService.querySpaceList(reqDTO));
    }

    /**
     * B1-2存档联盟应用(平台）
     * gen by moon at 8/10/2022, 3:43:44 AM
     */
    @PostMapping("/oms/platform/base/archiveApp")
    @ApiOperation(value = "B1-2存档联盟应用(平台）", response = OkrResult.class)
    public OkrResult<BffArchiveAppRespDto> archiveApp(@RequestBody(required = false) @Validated BffArchiveAppReqDto reqDTO) {
        return OkrResult.success(baseService.archiveApp(reqDTO));
    }

    /**
     * B1-2存档场景（平台）
     * gen by moon at 8/10/2022, 3:43:42 AM
     */
    @PostMapping("/oms/platform/base/archiveScene")
    @ApiOperation(value = "B1-2存档场景（平台）", response = OkrResult.class)
    public OkrResult<BffArchiveSceneRespDto> archiveScene(@RequestBody(required = false) @Validated BffArchiveSceneReqDto reqDTO) {
        return OkrResult.success(baseService.archiveScene(reqDTO));
    }

    /**
     * 11111B1-2查应用短信配置详情
     */
    @PostMapping("/oms/platform/base/queryAppMessageSetDetail")
    @ApiOperation(value = "11111B1-2查应用短信配置详情", response = OkrResult.class)
    public OkrResult<BffQueryAppMessageSetDetailRespDto> queryAppMessageSetDetail(@RequestBody(required = false) @Validated BffQueryAppMessageSetDetailReqDto reqDTO) {
        return OkrResult.success(baseService.queryAppMessageSetDetail(reqDTO));
    }

    /**
     * 111111B1-2修改应用短信配置
     */
    @PostMapping("/oms/platform/base/updateAppMessageSet")
    @ApiOperation(value = "111111B1-2修改应用短信配置", response = OkrResult.class)
    public OkrResult<BffUpdateAppMessageSetRespDto> updateAppMessageSet(@RequestBody(required = false) @Validated BffUpdateAppMessageSetReqDto reqDTO) {
        return OkrResult.success(baseService.updateAppMessageSet(reqDTO));
    }

    /**
     * B1-2新增平台应用（平台）
     * gen by moon at 12/2/2022, 5:09:39 PM
     */
    @PostMapping("/oms/platform/base/addPlatformApp")
    @ApiOperation(value = "B1-2新增平台应用（平台）", response = OkrResult.class)
    public OkrResult<BffAddPlatformAppRespDto> addPlatformApp(@RequestBody(required = false) @Validated BffAddPlatformAppReqDto reqDTO) {
        return OkrResult.success(baseService.addPlatformApp(reqDTO));
    }

    /**
     * B1-1完善平台应用（平台）
     * gen by moon at 8/10/2022, 3:43:30 AM
     */
    @PostMapping("/oms/platform/base/perfectPlatformApp")
    @ApiOperation(value = "B1-1完善平台应用（平台）", response = OkrResult.class)
    public OkrResult<BffPerfectPlatformAppRespDto> perfectPlatformApp(@RequestBody(required = false) @Validated BffPerfectPlatformAppReqDto reqDTO) {
        return OkrResult.success(baseService.perfectPlatformApp(reqDTO));
    }

    /**
     * B1-2取消设无效空间（平台）
     * gen by moon at 8/10/2022, 3:43:29 AM
     */
    @PostMapping("/oms/platform/base/cancelIsinvalidSetSpaceId")
    @ApiOperation(value = "B1-2取消设无效空间（平台）", response = OkrResult.class)
    public OkrResult<BffCancelIsinvalidSetSpaceIdRespDto> cancelIsinvalidSetSpaceId(@RequestBody(required = false) @Validated BffCancelIsinvalidSetSpaceIdReqDto reqDTO) {
        return OkrResult.success(baseService.cancelIsinvalidSetSpaceId(reqDTO));
    }

    /**
     * B1-2查场景列表（公共）
     * gen by moon at 8/10/2022, 3:43:12 AM
     */
    @PostMapping("/oms/platform/base/querySceneListCom")
    @ApiOperation(value = "B1-2查场景列表（公共）", response = OkrResult.class)
    public OkrResult<BffQuerySceneListComRespDto> querySceneListCom(@RequestBody(required = false) @Validated BffQuerySceneListComReqDto reqDTO) {
        return OkrResult.success(baseService.querySceneListCom(reqDTO));
    }

    /**
     * B1-2查联盟应用列表（边界）
     * gen by moon at 8/10/2022, 3:43:08 AM
     */
    @PostMapping("/oms/platform/base/queryAppListBorder")
    @ApiOperation(value = "B1-2查联盟应用列表（边界）", response = OkrResult.class)
    public OkrResult<BffQueryAppListBorderRespDto> queryAppListBorder(@RequestBody(required = false) @Validated BffQueryAppListBorderReqDto reqDTO) {
        return OkrResult.success(baseService.queryAppListBorder(reqDTO));
    }

    /**
     * B1-2设为是否无效空间（平台）
     * gen by moon at 8/10/2022, 3:41:07 AM
     */
    @PostMapping("/oms/platform/base/updateIsinvalidSetSpaceId")
    @ApiOperation(value = "B1-2设为是否无效空间（平台）", response = OkrResult.class)
    public OkrResult<BffUpdateIsinvalidSetSpaceIdRespDto> updateIsinvalidSetSpaceId(@RequestBody(required = false) @Validated BffUpdateIsinvalidSetSpaceIdReqDto reqDTO) {
        return OkrResult.success(baseService.updateIsinvalidSetSpaceId(reqDTO));
    }

    /**
     * B1-2查询场景列表（平台）
     * gen by moon at 8/10/2022, 3:41:05 AM
     */
    @PostMapping("/oms/platform/base/querySceneList")
    @ApiOperation(value = "B1-2查询场景列表（平台）", response = OkrResult.class)
    public OkrResult<BffQuerySceneListRespDto> querySceneList(@RequestBody(required = false) @Validated BffQuerySceneListReqDto reqDTO) {
        return OkrResult.success(baseService.querySceneList(reqDTO));
    }

    /**
     * B1-2查询空间应用详情（平台）
     * gen by moon at 11/29/2022, 8:06:51 PM
     */
    @PostMapping("/oms/platform/base/querySpaceAppDetail")
    @ApiOperation(value = "B1-2查询空间应用详情（平台）", response = OkrResult.class)
    public OkrResult<BffQuerySpaceAppDetailRespDto> querySpaceAppDetail(@RequestBody(required = false) @Validated BffQuerySpaceAppDetailReqDto reqDTO) {
        return OkrResult.success(baseService.querySpaceAppDetail(reqDTO));
    }

    /**
     * B1-2修改联盟应用（平台）
     * gen by moon at 8/10/2022, 3:40:33 AM
     */
    @PostMapping("/oms/platform/base/updateApp")
    @ApiOperation(value = "B1-2修改联盟应用（平台）", response = OkrResult.class)
    public OkrResult<BffUpdateAppRespDto> updateApp(@RequestBody(required = false) @Validated BffUpdateAppReqDto reqDTO) {
        return OkrResult.success(baseService.updateApp(reqDTO));
    }

    /**
     * B1-2新增空间应用（平台）
     * gen by moon at 12/2/2022, 5:09:38 PM
     */
    @PostMapping("/oms/platform/base/addSpaceApp")
    @ApiOperation(value = "B1-2新增空间应用（平台）", response = OkrResult.class)
    public OkrResult<BffAddSpaceAppRespDto> addSpaceApp(@RequestBody(required = false) @Validated BffAddSpaceAppReqDto reqDTO) {
        return OkrResult.success(baseService.addSpaceApp(reqDTO));
    }

    /**
     * B1-2查询联盟应用详情（平台）
     * gen by moon at 8/10/2022, 3:40:18 AM
     */
    @PostMapping("/oms/platform/base/queryAppDetail")
    @ApiOperation(value = "B1-2查询联盟应用详情（平台）", response = OkrResult.class)
    public OkrResult<BffQueryAppDetailRespDto> queryAppDetail(@RequestBody(required = false) @Validated BffQueryAppDetailReqDto reqDTO) {
        return OkrResult.success(baseService.queryAppDetail(reqDTO));
    }

    /**
     * B1-2查询联盟应用列表（平台）
     * gen by moon at 8/10/2022, 3:40:16 AM
     */
    @PostMapping("/oms/platform/base/queryAppList")
    @ApiOperation(value = "B1-2查询联盟应用列表（平台）", response = OkrResult.class)
    public OkrResult<BffQueryAppListRespDto> queryAppList(@RequestBody(required = false) @Validated BffQueryAppListReqDto reqDTO) {
        return OkrResult.success(baseService.queryAppList(reqDTO));
    }

    /**
     * B1-2修改空间（平台）
     * gen by moon at 8/10/2022, 3:39:59 AM
     */
    @PostMapping("/oms/platform/base/updateSpace")
    @ApiOperation(value = "B1-2修改空间（平台）", response = OkrResult.class)
    public OkrResult<BffUpdateSpaceRespDto> updateSpace(@RequestBody(required = false) @Validated BffUpdateSpaceReqDto reqDTO) {
        return OkrResult.success(baseService.updateSpace(reqDTO));
    }

    /**
     * B1-2查询空间详情（平台）
     * gen by moon at 8/10/2022, 3:39:57 AM
     */
    @PostMapping("/oms/platform/base/querySpaceDetail")
    @ApiOperation(value = "B1-2查询空间详情（平台）", response = OkrResult.class)
    public OkrResult<BffQuerySpaceDetailRespDto> querySpaceDetail(@RequestBody(required = false) @Validated BffQuerySpaceDetailReqDto reqDTO) {
        return OkrResult.success(baseService.querySpaceDetail(reqDTO));
    }

    /**
     * B1-2新增空间（平台）
     * gen by moon at 11/28/2022, 2:19:26 PM
     */
    @PostMapping("/oms/platform/base/addSpace")
    @ApiOperation(value = "B1-2新增空间（平台）", response = OkrResult.class)
    public OkrResult<BffAddSpaceRespDto> addSpace(@RequestBody(required = false) @Validated BffAddSpaceReqDto reqDTO) {
        return OkrResult.success(baseService.addSpace(reqDTO));
    }

    /**
     * B1-2查询场景详情（平台）
     * gen by moon at 8/10/2022, 3:39:26 AM
     */
    @PostMapping("/oms/platform/base/querySceneDetail")
    @ApiOperation(value = "B1-2查询场景详情（平台）", response = OkrResult.class)
    public OkrResult<BffQuerySceneDetailRespDto> querySceneDetail(@RequestBody(required = false) @Validated BffQuerySceneDetailReqDto reqDTO) {
        return OkrResult.success(baseService.querySceneDetail(reqDTO));
    }

    /**
     * B1-2修改场景（平台）
     * gen by moon at 8/10/2022, 3:39:25 AM
     */
    @PostMapping("/oms/platform/base/updateScene")
    @ApiOperation(value = "B1-2修改场景（平台）", response = OkrResult.class)
    public OkrResult<BffUpdateSceneRespDto> updateScene(@RequestBody(required = false) @Validated BffUpdateSceneReqDto reqDTO) {
        return OkrResult.success(baseService.updateScene(reqDTO));
    }

    /**
     * B1-2查询筛选空间列表(管理)(边界)
     * gen by moon at 10/25/2022, 10:01:15 AM
     */
    @PostMapping("/oms/platform/mgt/base/queryScreenSpaceListBorder")
    @ApiOperation(value = "B1-2查询筛选空间列表(管理)(边界)", response = OkrResult.class)
    public OkrResult<BffQueryScreenSpaceListBorderRespDto> queryScreenSpaceListBorder(@RequestBody(required = false) @Validated BffQueryScreenSpaceListBorderReqDto reqDTO) {
        return OkrResult.success(baseService.queryScreenSpaceListBorder(reqDTO));
    }

}

